Meaning inference from speech audio

ABSTRACT

A system and method invoke virtual assistant action, which may comprise an argument. From audio, a probability of an intent is inferred. A probability of a domain and a plurality of variable values may also be inferred. Invoking the action is in response to the intent probability exceeding a threshold. Invoking the action may also be in response to the domain probability exceeding a threshold, a variable value probability exceeding a threshold, detecting an end of utterance, and a specific amount of time having elapsed. The intent probability may increase when the audio includes speech of words with the same meaning in multiple natural languages. Invoking the action may also be conditional on the variable value exceeding its threshold within a certain period of time of the intent probability exceeding its threshold.

The present application is a continuation of U.S. patent applicationSer. No. 17/653,365 filed Mar. 3, 2022 entitled “Meaning Inference fromSpeech Audio”, to be issued as U.S. Pat. No. 11,769,488, whichapplication is a continuation of U.S. patent application Ser. No.16/704,216 filed Dec. 5, 2019 entitled “Synthesizing Speech RecognitionTraining Data”, issued as U.S. Pat. No. 11,308,938, which applicationsare incorporated herein by reference in their entirety.

FIELD OF THE INVENTION

The present invention is in the field of natural language understandingusing neural network machine learning.

BACKGROUND

FIG. 1 shows the architecture of a conventional virtual assistant with avoice interface. The virtual assistant receives captured speech audiofrom a source such as a microphone or packets of audio data over anetwork. The virtual assistant performs automatic speech recognition(ASR) 101 on the captured speech audio to produce a transcription. Someproduce a set of multiple transcription hypotheses, each having aprobability score. The virtual assistant of FIG. 1 performs naturallanguage understanding (NLU) 102 on the transcription or does so inmultiple instances on transcription hypotheses. NLU produces an intent.That is a data structure having information on which the virtualassistant can act to assist a user.

The virtual assistant makes a decision as to when the user has made acomplete expression with a complete intent. We will call that a hit.Some virtual assistants determine that a hit has occurred when a userstops speaking for a sufficient amount of time. This is calledend-of-utterance (EOU) detection. Some virtual assistants instead oralso determine a hit based on the apparent completeness of an expressionaccording to NLU.

The virtual assistant of FIG. 1 , after determining that a hit hasoccurred, promptly does something 103 that would likely be useful to theuser given the expressed intent. The something is any kind of functionappropriate for responding to the intent. For example, a virtualassistant might perform a web application programming interface (API)call, such as by using the HTTP protocol, to a source of data 104 on theinternet. This is useful, for example, for looking up the weatherforecast. For another example, the virtual assistant might perform anaction such as sending a message with words contained in the intent orcausing a robot to physically move. The function can be defined in asoftware development kit (SDK), where an API access is one example of anappropriate function call.

The virtual assistant of FIG. 1 , after doing something, produces aresponse to the user. This can include data from an API access,acknowledgment of an action, any other relevant information. The virtualassistant performs text-to-speech (TTS) 105 to synthesize speech audio.The response can include indications of prosody for the synthesizedspeech in order to emphasize certain words and deliver a desirablespeech style. Conventional systems include a lot of complex technologyin the ASR and NLU components that, collectively, receive speech audioand produce an intent and hit signal.

FIG. 2 shows conventional components within an ASR function. An acousticmodel 201 receives audio, partitions it into frames, and performsdigital signal processing (DSP) to convert audio samples to spectralenergy values within the frames. Older systems used hidden Markov models(HMMs) on the spectral data. Newer systems use neural network (NN)models 202. Other approaches are possible. The acoustic model producesphoneme sequence hypotheses and an acoustic score for each hypothesis.

In a process of tokenization 203, ASR for alphabetic languages check thephoneme sequence hypotheses against a pronunciation dictionary 204 thatincludes one or more pronunciation for each word. For full languagetranscription, pronunciation dictionaries might have 1 million or morewords. For application-specific systems, the dictionary can be smaller.Tokenization produces word sequence hypotheses made up of sequences ofwords that comprise the hypothesized sequence of phonemes in order.Non-alphabetic languages, such as Chinese languages, instead oftokenization according to a dictionary, assemble phonemes intopronunciations of characters in order. Whether characters or words, theresult is token sequence hypotheses.

A statistical language model (SLM) 205 uses the token sequencehypotheses and the acoustic scores corresponding to the phoneme sequencehypotheses from which the token sequence hypotheses are derived andcomputes a probability score for each token sequence hypothesis. Theprobability score is based on the frequency with which the sequence oftokens is likely to appear in the language, weighted by the probabilityof the token sequence according to the acoustic score. In systems suchas ones for long-form dictation, the output of ASR is the transcriptionhypothesis with the single highest SLM score. In virtual assistants thatperform NLU, ASR can output multiple transcription hypotheses and theircorresponding scores, each of which can be processed to compute the mostprobable intent. SLMs are trained on corpora of examples of languageusage. Older SLMs used n-gram models 206, which computes probabilitiesof sequences of N number of tokens. Typically, N is 3 or 4 but can beless or more. More modern SLMs use NN models, and particularly ones withlong-term recurrence such as long short-term memory (LSTM) NNs. Theselearn to give weight to long-prior tokens in proportion to theirdiscriminative value.

FIG. 3 shows the components of conventional NLU. It receivestranscriptions. These can be a multiplicity of transcriptions hypothesesfrom ASR or a single transcription such as one input as text such asfrom a keyboard. The transcription hypotheses are compared to grammars301. Grammars include phrasings and slots. Slots are place holders forinformation that can be filled from lists of possible values. Forexample, the name of a place is useful for a grammar related to weather.A time can be a slot value. A slot value can also be any arbitrarynumber, such as for a grammar that performs calculations.

Phrasings within grammars can be expressed in various specific formatssuch as regular expression format, or proprietary formats. FIG. 3 showsan example grammar with the phrasing “what's the weather [going to be]in <PLACE>[on] <TIME>”. This is written in a format the considers squarebracketed text to be optional and angle bracketed text to be slotvalues. Therefore, the example matches the transcription “what's theweather in Chicago on Wednesday” and “what's the weather going to be inMiami next week”. Some virtual assistants group grammars based on thedomains of knowledge that they can address. However, domain groupings302 are not necessary for normal function.

Grammars produce intents and scores. For example, the grammar shown inFIG. 3 will produce an intent with a weather API universal resourcelocator (URL) that includes arguments filled with the PLACE and TIMEslot values. Grammars also can give scores based on the probability ofparticular phrasings. For example, the English sentence “what's theweather going to be in Boston on yesterday” is an awkward way ofspeaking and somewhat non-sensical to use the future tense indicator“going to be” with a past tense time “yesterday”. As a result, a grammarmight give that sentence a low score whereas “what's the weather inSeattle currently” would match the grammar with a meaningful intent andhigh grammar score.

A virtual assistant NLU component selects 303 the intent with thehighest grammar score. A voice virtual assistant chooses the intent withthe highest grammar score as weighted by the SLM score, which itself isweighted by the acoustic score. Other score components are possible invarious virtual assistants' designs.

Some virtual assistants store conversation state 304. Among otherinformation, this includes slot values. As a result, a query “what's theweather in Seattle” stores Seattle as the value of a PLACE slot. Afollowing query using a pronoun “there”, such as “how long would it taketo drive there” fills the PLACE slot with the value Seattle since it wasthe most recently mentioned place. As a result, such a virtual assistantcan understand speech expressed in natural styles.

The Problem

Conventional systems have a lot of components. Some components aredesigned by smart engineers using the best available research. It isalways improving, but never perfect. Some components of conventionalsystems are trained from large corpora of data. The amount of data isfinite, and a corpus used for training a system is never a perfect matchfor the future use of the system. Every component of the system hasinaccuracy, which loses useful information throughout the pipeline. Mucheffort goes into improving each stage individually and much effort goesinto making the stages interact with each other well. However, thoseefforts need to be different and therefore repeated for each humanlanguage based on their peculiarities. Furthermore, they need to be donedifferently based on the application, such as ones with few or manydomains, large or small vocabularies, power-sensitive orlatency-critical, and to meet other application-specific constraints.

Acoustic data is expensive. Text word statistics are an imperfect matchfor speech. Corpora for domain-specific language models aredifficult/impossible/expensive. Domain grammars require programmingskills. The more powerful the grammar language, the more advanced theskills needed. The more domain grammars a system has, the morefine-tuning is needed to decipher the ambiguity of natural human speech.

Engineers' salaries are astronomically expensive to spend on suchfine-tuning.

The state of the art has demonstrated acceptable accuracy for“end-to-end” transcription without AM or LM. But text is not the end fora virtual assistant. The end is an actionable expression of the intentof the speech, such as NLU grammars produce.

SUMMARY

The present invention provides a unitary system for extracting meaningfrom speech audio. The input is digitized speech audio. Some systemstake in time domain representations and some take in frequency domainrepresentations. The output is a data structure representing an intent.The data structure is in a format that, with little further processing,provides the input needed for a function that performs an action orreads a data value. An optional output is a hit signal that indicatesthat the speaker has completed an expression.

Some systems comprise a main intent recognizer and one or more variablerecognizer. Intent recognizers detect the completion of an expressionhaving a certain type of intent. Variable recognizers are useful forsystems that support complex expressions that have entity values such asplace names or numbers. Variable recognizers take in the speech audioand output an indication of which enumerated value of the variable isrecognized. Variable recognizers optionally output a signal thatindicates that an enumerated value of the variable has been detected.Variable values are useful in many systems as the arguments for theintent data structure output. Some intent recognizers may use thedetection of an enumerated value of a variable as an input to informdetection of a complete intent.

Some systems may have multiple or many intent recognizers and multipleor many variable recognizers. The outputs of some types of variablerecognizers can inform multiple intent recognizers and some intentrecognizers can observe the output of multiple variable recognizers.

Some systems treat groups of related intent recognizers as domains. Suchsystems may optionally include a domain recognizer that takes in speechaudio and outputs an indication of which of a plurality of domains towhich the speech refers.

Recognizers may be implemented based on neural networks trained onspeech audio to produce a hit output and variable value outputs. Intentrecognizers may be trained on multiple phrasings of the same intent,including phrasings in any number of human languages. To reduce datacollection time and cost, variable recognizers can be trained ongenerated speech audio.

Some systems offer recognizers for natural language understanding as aservice through a platform either alone or as part of a virtualassistant capability.

Interactions between devices that capture audio and recognizer servicescan be through network connections, including wireless connections. Manysystems are implemented using software instructions stored on storagemedia such that when a processor executes the instructions it performsmethods and behaves as systems described and claimed herein.

DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a diagram of a speech-controlled system.

FIG. 2 shows a diagram of a speech-to-text process.

FIG. 3 shows a diagram of a natural language understanding process.

FIG. 4 shows a black box view of neural speech-to-meaning.

FIG. 5A shows an input audio waveform.

FIG. 5B shows an input audio spectrogram.

FIG. 6 shows a diagram of some basic recognizer elements.

FIG. 7 shows an example of instances of some types of recognizers.

FIG. 8 shows an example of a neural network architecture.

FIG. 9 shows a diagram of translation through a learned semantic space.

FIG. 10 shows an example generative neural network for producing speechaudio.

FIG. 11 shows a diagram of an example platform ecosystem forspeech-controlled systems.

FIG. 12A shows a rotating non-transitory computer-readable medium.

FIG. 12B shows a solid-state non-transitory computer-readable medium.

FIG. 13A shows a packaged system-on-chip device.

FIG. 13B shows a high-level functional block diagram of an examplesystem-on-chip.

FIG. 14A shows a server blade system.

FIG. 14B shows a high-level functional block diagram of an exampleserver architecture.

DETAILED DESCRIPTION

The following describes various embodiments of claimed inventions. Thedescribed embodiments have various components. Some components havealternative design choices. Some components are optional. The followingdescription is not necessarily explicit about whether each component isoptional, whether design choices have alternatives, and what allpossible alternatives are. The following description gives examples,from which ordinarily skilled practitioners will understand thedescribed inventions and the claims. The following description uses theword system to describe machines and methods and at different levelssuch that one system might be a component of another system.

Intents

An intent is a request that has a specific expected type of response.Many verbal phrasings can have the same intent. For example, “what's thetime” and “what time is it” are two phrasings with the same intent.Systems can represent intents as structured data. Structured data can berepresented in specific schemas using formats such as JSON or XML. Insystems that function using API calls, an intent can be represented as(a) a set of arguments for an API request and (b) in some cases, aselection of which information from an API response is interesting tothe user.

In general, the more detailed capabilities of a system, the fewerphrasings there are for each intent. A time-telling system that onlygives one kind of response gives that response for phrasings “what timeis it”, “what hour is it”, and “what minute is it”, but a time-tellingsystem with capabilities to report the full time, just the hour, or justthe minute has three intents, each of which responds on only one ofthose phrasings.

Some systems can respond to many intents that are the same but for oneor a small number of variable pieces of information. For example, asystem that can report the weather in any of many different cities canhave many different intents. However, due to practical limitations oncollecting data and training a system, it is more efficient to design itwith one intent that includes a variable where the variable can have anyof the many specific values.

A general intent data structure is one that has placeholders forvariables if the intent has variables. A specific intent data structureis one that specifies specific values for each variable.

API Example

Many virtual assistants retrieve information of interest to a user byaccessing (“hitting”) an API. Many modern APIs use a RepresentationalState Transfer (REST) style. This is typically done through a programsuch as command-line URL (curl) or a web framework such as Flask.

This is an example request to an API for procuring weather information.The request has a URL, which has an argument q with value London.

api.openweathermap.org/data/2.5/weather?q=London

This is an example response to an API hit with the URL above.

temp: 286.67 temp_min: 281.556 temp_max: 286.67 pressure: 972.73humidity: 75 description: “clear sky” wind speed: 1.81 wind direction:247.501 dt_txt: “2017-02-16 12:00:00” city: “London”

The response comprises more information about the weather than a userusually wants, and the information is formatted differently. A usefulvirtual assistant, responding to the intent of a user's question, would,therefore, provide a resulting verbal user response such as, “theweather in London is 14 degrees Celsius with clear skies”. Note that286.67 degrees kelvin is 13.52 degrees Celsius.

Many API hits involve accessing a data source over a network. Generallythe data is on a server and the virtual assistant performing the API hitis a client. Devices that contain virtual assistants may include networkclient hardware and/or software functionality.

Output and Input

FIG. 4 shows an overview of the input and outputs of a neuralspeech-to-meaning system 400. An output is an intent data structure in aform similar to ones described above. The output may vary effectivelycontinuously over time as a system runs. It may also be registered atparticular times when a system hypothesizes that a user expression iscomplete. In such a case, there may be an additional signal indicatingthat a hit has occurred. The hit signal might be continuously varying ormight emit a pulse at times of hypothesizing complete expressions.

The input to neural speech-to-meaning is speech audio data. It ispossible to take in raw time-domain audio samples. FIG. 5A shows atime-domain waveform of a sample of speech.

Conventional ASR includes a first digital signal processing step ofconverting time-domain samples to a spectral representation. FIG. 5Bshows a spectrogram of speech (“never touch a snake with your barehands”). It shows the frequency components of speech audio vertically asthey vary, per frame, in time horizontally.

Many conventional ASR systems compute Mel-frequency CepstralCoefficients (MFCCs) at roughly a 10 ms frame rate (100 frames persecond being somewhat faster than the fastest human rate of phonemeproduction expected to be recognized) on windows of roughly 25 ms ofaudio samples. The mel scale is well designed for average human speech,so little useful information is lost by converting raw time-domain audiosamples to MFCC coefficients. However, neural networks are good atmaking inferences from raw data, and MFCC coefficient calculationconsumes unnecessary computing performance.

Two approaches to learning are possible.

(1) Use windowing. This attempts to learn an acoustic model directlyfrom a raw waveform and replace the windowing/FFT/log mel filterbankwith a convolutional layer like the approach described in the paper“Learning the Speech Front-end With Raw Waveform CLDNNs” by Sainath, etal. (2015). However, this learned speech front end still takes in audiowindows of size 25-50 ms, with a shift of 10 ms. It ends up learningsimilar filterbanks to those traditionally used in speech recognition,which suggests that that's an (almost) optimal feature input. This sortof architecture is relatively common for end-to-end speech recognitionsystems such as described in the paper “End-to-End Speech RecognitionFrom the Raw Waveform” by Zeghidour, et al. (2018).

It is also possible to use non-overlapping windows. Tüske, et alldescribe such an approach using a DNN in their paper “Acoustic Modelingwith Deep Neural Networks Using Raw Time Signal for LVCSR” (2014). TheDNN learns bandpass filters (again showing that the melfb/gammatoneseems pretty close to ideal), but with sufficient training data, is ableto achieve similar performance as using front end features orunprocessed, non-overlapping input windows.

(2) Send in one sample at a time to a recurrent network. This approachdoes not require windowing. Acceptable performance requires havingenough context to make informed decisions. Some vowels, for example, canbe 200 ms long. At 16 kHz sampling rate, that requires memory across3200 samples. This can be addressed in various ways, such as by usingtime dilation in an RNN as described by Chang, et al. in the paper“Dilated Recurrent Neural Networks” (2017) or as in CNNs such as used inthe Google Wavenet audio generative system.

Improved performance is possible with combinations of the two approachesabove. Using context-independent targets can help, by avoiding a need tohave a long enough memory to see the previous and next phonemes.

Basic System

FIG. 6 shows a high-level view of components of a simple neuralspeech-to-meaning system. It comprises an intent recognizer 401 and avariable recognizer 402. The intent recognizer is a neural-network-basedmodel that takes in audio that may contain speech and outputs a signalto invoke a request for a virtual assistant action. The intentrecognizer issues the request when a probability of the speech audiohaving the intent reaches a threshold. The level of the threshold may befixed by design of the system or may be dependent on application,environment, time, or other contextual information.

The request can be a pulse or a continuously varying level. It can beprogrammed with a kind of hysteresis effect or hold-off timer so thatafter issuing a request, the intent recognizer will not issue a secondrequest before at least the shortest amount of time in which a usermight make a second expression with an intent. Hitting a web API bymaking transmitting a request over the internet is an example of avirtual assistant action. Sending a signal within a device to cause itto control a motor is another example.

The intent recognizer is trained on a large number of voices formultiple phrasings of the intent, potentially in multiple humanlanguages. A single-user system could be trained by the user speakingeach phrasing several times. A system to support any voice might befunctional if trained on 50 diverse voices, but a mass productionquality system should be trained on many thousands of different voices.

In some systems, intent recognizers run continuously on audio and invokean API hit whenever an intent is recognized. Alternatively, intentrecognizers run only after a phrase spotter detects a wake phrase andthey condition their signal of an API hit on an end-of-utterancedetection, such as one that recognizes a period of non-speech for aspecific duration.

A variable recognizer 402 takes in audio and outputs a signal indicatingthat it has recognized a known enumerated value for the variable in theaudio. The value of the variable provides an argument for an API hit.

The variable detected signal and the value of the variable may be usedby intent recognizers as inputs to inform intent detection. This isuseful, for example, to cause an intent recognizer to look up theweather when receiving audio of “I don't know the weather in Boston”since Boston would be recognized as a known enumerated value of a cityname variable, but prevent the recognizer from performing a weatherinformation request in response to “I don't know whether to stay or go”since no city name appears shortly before or after the important wordthat sounds like “weather”. Accordingly, the output of a request for avirtual assistant action (e.g. API hit) is conditional on theprobability of the speech audio having an enumerated variable value.

In some systems, variable recognizers output both a signal that avariable is detected and a timestamp of when it was detected. Intentrecognizers may be trained to use the timing of variable recognitionrelative to currently captured speech to inform intent detection.Another approach is for a variable-dependent intent recognizer to betrained with recurrence or an LSTM layer to compute its intentprobability according to a time-delayed peak in a probability value froma variable recognizer. For example, “weather in Boston” and “Boston'sweather” trigger a weather intent despite the key information “weather”and “Boston” coming in a different order. However, “in Boston weather”and “weather's Boston” do not trigger the intent because the relativeorder of the variable name “Boston” compared to the timing of “in” or“'s” is learned as not a hit of the intent.

Virtual assistants based on neural speech-to-meaning typically compriseeither multiple discrete intent recognizer networks, each with an APIhit trigger or a global intent recognizer network with multiple outputs,an intent recognizer for each API hit trigger.

The system shown in FIG. 6 varies from other “end-to-end” speech-to-textmodels, or natural language intent inference models in that there is nopoint in the system at which there is a human-readable transcription ofspeech. There is no lexical representation of the speech as input, asoutput, or that could be observed or extracted internally from thesystem.

FIG. 7 shows the architecture of a virtual assistant made with neuralspeech-to-meaning recognizers. Three domains are shown, one for each ofweather, business, and navigation. The weather domain has intentrecognizers for current weather 401 a, weather tomorrow 401 b, and10-day forecast 401 c. The business domain has a restaurant searchintent recognizer 401 d and the navigation domain has a navigationrequest intent recognizer 401 e. Each domain may have other intentrecognizers.

The architecture also comprises variable recognizers trained torecognize names of people 402 a, names of places 402 b, streets 402 c,and numbers 402 d. The virtual assistant may have other types ofvariable recognizers. A recognizer for people names would be useful forvirtual assistants that support sending messages to people. A variablerecognizer for names of cities is useful in conjunction with appropriateintent recognizers for answering queries about weather in specificcities at specific times, searching for restaurants, and performingnavigation to specific locations. A variable recognizer for numbers isalso useful for navigation requests, such as for navigating to specificaddresses.

The virtual assistant architecture of FIG. 7 also comprises a domainrecognizer 403. This is trained on recordings of speech labeled by thedomain of the speech. Training data is easy to collect and label for adomain recognizer. It can provide a score that is useful to disambiguateor weight the hypothesis scores of hits in various domain-specificintent recognizers.

Some speech-based virtual assistant devices, which perform recognitionof intents from input speech audio, also provide responses to users inthe form of TTS-synthesized speech audio. Some mobile and direct userdevices include a local TTS engine that can produce speech from textreceived from a server. Some systems perform speech synthesis on aserver, using a speech synthesis engine, and provide the speech outputas digital audio sent through a network.

Conditional Invocation

For systems that are power sensitive or performance limited, such asmobile devices and data centers, it can be beneficial to avoid runningrecognizers unnecessarily. Accordingly, it is possible for recognizersto compute probability scores and invoke others, as needed, depending onthe score.

For example, an intent recognizer may operate independently of avariable recognizer in a steady state. Upon its score reaching athreshold, the intent recognizer may invoke one or more variablerecognizers for variables potentially present in the intent.

For example, a domain recognizer may operate continuously and computescores for each of many possible domains or individual intents. Upon ascore reaching a threshold, the domain recognizer may invoke one or moreintent recognizers. The domain recognizer may also invoke variablerecognizers, as appropriate.

For example, a variable recognizer may run continuously and compute aprobability score. Upon the score reaching a threshold, the variablerecognizer may invoke one or more intent recognizers that can depend onthe variable. Variable recognizers may invoke intent recognizers basedon which of multiple enumerated variables is recognized. This is usefulto avoid invoking intent recognizers that do not understand all variablevalues. It can also be useful for allowing the training of variablerecognizers that work across multiple variable types. For example, asingle variable recognizer may be trained for points of interest nametype variables and street name type variables for London. Closing timeof day intents would be invoked only for point of interest values, notstreet name values. A separate variable recognizer for points ofinterest and street names would be trained for Paris. Similarly,variable recognizers for multiple variable types may be trained fordifferent spoken languages that specific users use or that is used inlocations where specific products are sold.

System Build-Up

The following are procedures involved in creating and enhancing a systemcapable of neural speech-to-meaning.

Adding an intent—To add an intent to a system, a designer may brainstormphrasings for the intent and put those phrasings in random order into asystem to procure diverse voice data from readers expressing the intent.An open example of such a system is Mozilla Common Voice, in whichparticipants read sentences aloud for their phone or computer to capturetheir voice. Such a system can be useful to collect a diverse range ofvoices speaking the various phrasings of a new intent.

Creating a variable recognizer—For each type of variable in an intent,it is necessary to have a variable recognizer. It needs to be able torecognize all supported values of the variable (e.g. names of cities).It is possible to train a variable recognizer from aligned transcribedspeech recordings that cover all variable values. It is also possible tocollect recordings of specific variable values through a voice recordingcollection system.

A new intent may use an existing variable recognizer of an appropriatetype. However, if the intent can recognize values of the variable notrecognized by the variable recognizer, then it may be appropriate tocollect new voice recordings for the new variable values. A voicecollection system can do this by composing sentences for voice donors toread that replace values of variable words in the sentence with valuesof the variable that need more voice data to improve training accuracy.

Variable recognizers can be trained independently of intent recognizersbut may achieve better performance if trained with the context of usagein actual expressed intents since people speak a word differently alonethan in context. Intent recognizers can be trained independently withrecordings of intent phrasings. Intent recognizers will learn to ignorethe information in the audio recordings expressing variable values aslong as it varies significantly between recordings. It would also befine to zero out or add random noise to the audio sections with specificvariable values. Jointly training intent recognizers and theirsupporting variable recognizers can achieve somewhat faster training toa desired accuracy.

Once in operation, user voice queries can be captured and used toretrain recognizers and thereby improve future accuracy. One possibilityis to have human data labelers listen to query audio, look at responses,and simply indicate a true or false signal as to whether the responsewas appropriate to the query. Another possibility is for the humanlabelers to listen to query audio and simply indicate which, if any, ofa known set of domains the query addresses. Another possibility is forhuman labelers to listen to the query audio while seeing a displayindicating what API was hit and with what arguments and indicate whichare wrong and for wrong ones what the correct API hit or argument valuesshould be.

Another possibility is for a system to have a special intent recognizertrained to recognize indications that a previous virtual assistantresponse was dissatisfactory. Words such as, “no” or “I meant” or anirritated tone of voice can be such indicators. A dissatisfactionrecognizer can be used to flag prior expressions as having been likelyincorrect and giving those priority for human labeling or otherautomated procedures for labeling or improving training data.

Creating a neural speech-to-meaning virtual assistant system is verydifficult to start but gets better and easier as the system is used, andas data is collected from the usage.

Global and Hybrid Recognizers

One possible approach is to have discrete domain-specific recognizers.This is useful for building modular, configurable virtual assistants.For example, a platform can support configuring a first virtualassistant for a car that supports car control and weather domains butnot a cooking domain and a second virtual assistant for a smart speakerthat supports weather and cooking domains but not a car control domain.Discrete recognizers also have the benefit of enabling developers toadd, remove, and upgrade intent recognition independently withoutretraining a global model. It requires that each intent output aprobability score, the score to be normalized between intents, and afinal selection stage for selecting the most probable intent for anatural language expression.

Another approach is to train a global cross-domain intent recognizer.This is useful for minimizing redundancy in application-specificsystems. A global intent recognizer has the benefit of being trained forall possible intents and therefore to automatically make the selectionof the most probable intent.

Whether a global or discrete approach, the intent recognizer has anoutput that triggers reacting to the intent. This fulfills the functionof an end-of-utterance detector in conventional question-answeringvirtual assistants.

A hybrid approach is possible in which a global intent recognizer isretrained by holding fixed low-level features and training high-levelfeatures for new or improved intents without backpropagation to the heldlow-level feature weights and biases.

Some approaches to implementing neural speech-to-meaning recognizers areCNN-LSTM-DNN or seq-to-seq or RNN transducer model including attention.FIG. 8 shows an example that has 4 layers and can be used for an intentrecognizer. More or fewer layers are possible. It has a lowest inputlayer that is a convolutional layer that operates on a frame of audiosamples or a spectrogram of such. It computes a set of layer-1 featureprobabilities. A second layer is a recurrent layer. Recurrent nodes areshown with a double circle. The recurrence may be a long short-termmemory (LSTM) type. The layer 2 features are input to a smaller thirdlayer that is also recurrent and also may be an LSTM layer. The layer 3features are used by a feed-forward layer that takes an input from anexternal recognizer, shown with an X circle. The external recognitionmay be from one or more variable recognizers and/or a domain recognizer.In such an architecture, when used as an intent recognizer, thecombination of the top layer nodes produces a final output that indictsthat an API hit should occur.

This table shows, for one embodiment of a 4-layer neuralspeech-to-meaning network, for each level of complexity of features,what might be an appropriate analogy in scientific terms and inconventional ASR-NLU system terms.

Independent variable recognizers Features Scientific analogyConventional ASR-NLU analogy input speech audio samples layer 1 vocalformants mel filter bank activation layer 2 phonemes phonemes layer 3words transcription output meaning intent

A similar architecture as that on FIG. 8 is possible for use in avariable recognizer. A convolutional input, recurrence, and some deepfeed-forward layers are appropriate. When used as a variable recognizer,there may be many (potentially thousands) output nodes, eachrepresenting an enumerated variable value. There may also be a finalSoftMax layer, enabling a downstream system to identify a singlemost-probable variable value.

Some systems run variable recognizers continuously. They use multi-tasklearning with low layers recognizing common features such as vocalformants and discard irrelevant information such as acoustic informationspecific to gender and age. Higher layers will tend to be the ones thatlearn to distinguish between specific variable values.

Though it is possible to train a single recognizer for all variables,which has the benefit of avoiding duplication of computing for low-levelfeatures. Configurable and upgradeable systems need frequent retrainingof variable recognizers as new values become known, such as new placenames or names of new famous people. Some systems separate variablerecognizers by type, such as place names, people names, and businessnames. Some systems separate variable recognizers by geographiclocation, such as North America and Europe. Some systems separatevariable recognizers by language, such as mainland Chinese, Japanese,and English. Some systems separate variable recognizers by application,such as automobiles, smart speakers, and retail businesses.

A variable recognizer for common names of people is useful for intentsthat require accessing a user's personal contact list. An API handlingsuch an intent needs to receive the recognized name, perform phoneticmatching to a set of multiple known pronunciations of names in thecontact list, and return an error signal if the recognized name does notmatch any name in the address book. In some systems, separate variablerecognizers are appropriate for first names and last names.

Jointly Trained Variable Recognizers

It is possible to jointly train an intent recognizer and variablerecognizer such as in the paper by Bing Liu (Proceedings of the SIGDIAL2016 Conference, pages 22-30, Los Angeles, USA, 13-15 Sep. 2016).However, the Liu approach (a) has less coverage while doing beam searchsince the output space is exponential in the number of possible variablelabels; and (b) has no knowledge of a global intent while determiningthe variables.

A 2-pass approach circumvents the lack of global intent knowledge. Afirst pass looks at a long amount of time to determine the intent/domainof an entire sentence. A second pass is conditioned on the intentpredicted in the first pass. The second pass predicts the values for thevariable(s). A 2-pass approach has the disadvantage of requiringprocessing a complete sentence in the first pass before the second passcan begin, which makes large spikes of processing power demand to runthe second pass in order to meet real-time requirements.

A third approach addresses the problems of both of the former approacheswhile also needing to do only one pass. The third approach splits theconditional probability of variable value prediction from theword/acoustic signal as follows:

${P(x)} = {\sum\limits_{Domain}{{P(x)}{\sum\limits_{Intent}{{P( {{Domain}{❘x}} )}{P( {{Intent}{❘{{Domain},x}}} )}}}}}$

Since the only concerned is to predict the variable values for the mostprobable domain and/or intent, this approach converts the summation inthe above formula to argmax, thereby yielding the most probable (domain,intent, variable) triplet according to the following equation:

Domain*, Intent*, Variable*=argmax_(Domain,internet,variable)P(Domain|xx)P(Intent|Domain, x)P(variable|Domain, Intent, x)

Assuming we have D domains, I average intents per domain and S averagevariables per intent. The above equation has a complexity of O(DIS),which can be in the thousands. Furthermore, we do this for every featurein our input, thereby bringing the total complexity to O(TDIS) where Tis the total number of input time steps. To reduce the complexity, it ispossible to do beam search over the domains/intents by considering abeam width of W most probable intents/domains. This brings down thecomplexity to O(TWS). For practical cases, W can be in the approximaterange of 5-20.

While this approach predicts the variables and their values for the Wmost probable intents, the model keeps refining its intent probabilitydistribution with the ingestion of each input feature. At the end of Ttime steps, the distribution P(Intent|x) is used as a re-scoringmechanism to re-weight the corresponding variables, thereby making thefinal output consistent with the intent of the entire sentence.

With this approach, the coverage ratio is W/I rather than W/K^(T), whereW is the beam width, I is the number of distinct intents, K is thenumber of distinct variables labels from Bing Liu et. al. (2016) and Tis the total number of input features. Since I<<K^(T), our method hasexponentially better coverage than Bing Liu et. al. (2016), whilekeeping the conditional distribution of the variables computationallytractable.

ASR Recognizers

Some domains require arbitrary text. For example, a domain for sending adictated text message needs full vocabulary ASR. Text transcription iseffectively a special variable recognizer.

Consider training an intent recognizer to send a text message. A systemcan learn a phrasing in which the text is delimited by “text” at thebeginning and “to” at the end. That supports, for example, “text i loveyou to my mom”.

But, to support phrasing such as “text go to the store to my mom” wherethe word “to” appears in the ASR benefits from using an attention-basedmodel, where the model can look at both ends of the inputs whilepredicting the labels. The labels can be, for example, MESSAGE_BEGIN,MESSAGE_END, TO_PERSON_BEGIN, and TO_PERSON_END. For this, it isnecessary to have the complete sentence and hence is not possible to doin an iterative manner by looking at a word and predicting its label.

Domain Recognizers

Domains are collections of intent recognizers, or single trainedrecognizers with multiple intent outputs, related to a common datasource or similar topic.

To reduce inference-time processing in a system that supports multipledomains, train a domain recognizer to select between domain-specificintent recognizers and only run the one or a small number ofdomain-specific intent recognizers likely to recognize the speech.

Multilinguality

A benefit of these techniques is that they are language independent.Different spoken languages are just different learned phrasings ofintents. Neural translators are essentially encoder-decoders in anembedding space. For a reasonable number of intents, the dimensionalitycan be much smaller than a full human language-to-language translator.

The system can use neural translation capabilities where the intent isessentially just another target language for translation. FIG. 9 shows alearned semantic space. Expressions in any spoken language can be mappedto those of another language through the shared semantic space.Likewise, expressions can be mapped to intents as if they are a spokenlanguage.

This has the further surprising effect of allowing creation of a reversenetwork that can generate grammatically correct audible speech in ahuman language from a set of intent arguments.

Note that, due to loaned words between language, there is already a lotof overlap of variable recognizers across languages. For example, theword “KFC” and “iPhone” are used in all languages and lists ofinternationally known musician names are used across languages.

Intent recognizers can learn phrasings in any language using existingsemantic-space language translator models. This is practical becausevirtual assistants only support a tiny number of intents compared to themeanings of all possible sentences in languages. The intent JSON isuseful to form an API request with its arguments and to select what APIresponse data values are appropriate to provide to a user.

Quantifying Accuracy

Conventional systems measure word error rate of ASR. There are noindustry standard metrics for accuracy of grammar interpretation.Whether an interpretation is correct can be subjective. A more practicalmeasure of accuracy is overall user satisfaction. That is also the mostmeaningful way to quantify the accuracy of neural speech-to-meaning. Ofcourse, accuracy improves with larger amounts of training data and somedata is more useful than other.

Most systems of intent recognizers recognize fewer possible intents thanthere are possible combinations of words in a spoken expression. Mostvariable recognizers recognize fewer enumerated values than there arepossible combinations of words in a spoken expression. Therefore, theprediction space is much smaller for intent and variable recognizers andtherefore much less absolute accuracy is needed to achieve satisfactoryperformance.

Measuring intent recognizer accuracy is comparable to measuring theaccuracy of a phrase spotter in terms of giving false assertions ormissing actual expressions. Using neural speech-to-meaning in a systemwith a phrase spotter and end-of-utterance detector can further improveaccuracy by avoiding hit assertions during times of non-usage.Furthermore, after a wake phrase, at an end-of-utterance detection, asystem based on neural speech-to-meaning has a delimited segment ofspeech, known to have a complete expression, on which to operate todetermine what intent was expressed, if any.

The Cost of Procuring Data

One of the biggest challenges to bringing up a neural speech-to-meaningsystem and making it accurate is procuring enough training data andtraining data that is sufficiently diverse.

Bringing up a system with enough accuracy for user acceptance isrelatively easy for a system that starts with a small number of intentsand where users have reasonable expectations. For example: aspeech-based clock for blind people with one intent; a voice-controlledlight bulb with two intents: on and off; or a virtual meteorologistsupporting 10 to 20 intents such as a brief or long report for each of ageneral weather report, temperature report, or precipitation report foreach of today, tomorrow, or the next 10 days.

A 20-intent virtual meteorologist can be trained on about 100 carefullychosen phrasings per human language. Though there are more than 100/20=5possible phrasings per intent in a human language, the use of an LSTMmodel with attention will recognize the intent from key words in thevarious phrasings. For example, training on the phrasing “what istoday's high temperature” and “tell me the high temperature for today”will recognize almost any other reasonable user phrasing with the speechsegments “high temperature” and “today” in either order.

Plenty of volunteers will read, for example, 100 phrases in exchange fora $10 gift certificate. Quality data sources at even less than $10 per100 phrase readings are available today. From 100 to 1000 voices isprobably sufficient to train a 20-intent recognizer with acceptableaccuracy. That is a cost of $1000 to $10,000 for training data.

Readers seeing a sequence of phrases with an identifiably similar intentwill tend to use unnatural voice styles to avoid the monotony of theirtask. A training system can randomize the text samples for intents fordifferent types of devices, APIs, or contexts to discourageunnaturalness of reading. Furthermore, a system can randomize variablevalues within natural sentences to collect speech data for variables.

Some ways to collect “volunteer” readers' voice recordings are through adownloadable phone app, a web page with voice input capability such asMozilla Common Voice, or by placing noise-insulated recording booths inpublic places.

Some goofy readers might say something other than the text that theysee. Before using the data to train, it is possible to use conventionalASR to check the voice against the text. If a reader gives less than ahigh percentage, such as 90%, correct readings, their gift certificateis denied.

A speech-based system for a diverse range of users needs to be trainedon a diverse set of voices. It is possible to buy targeted advertising,such as through Facebook or Google AdWords, to attract the type of voicerecording volunteers needed to diversify the training set. For example,people of one gender are more likely to respond to general notificationsof voice recording opportunities, so buying ads targeting groups lesslikely to respond is a way to ensure a diverse set of training data.

A many-domain virtual assistant might have 100 domains, each with anaverage of 100 generic intents, each with an average of 10 effectivephrasings in each of 10 key languages, each needing 1000 voices for goodaccuracy. That requires around 1 billion recordings. At an average costper recording of 0.01 dollars per recording, the virtual assistant canbe trained for a mere 10 million dollars.

Domain-specialized assistants can be much less expensive.Single-language virtual assistants can be much less expensive.

Harvesting Data

It is also possible to harvest training data from databases of diversephrasings. Such databases exist as a result of saving voice utterancedata from users of pre-existing virtual assistant systems. Generally,those recordings are especially statistically relevant for trainingfuture neural speech-to-meaning virtual assistants. Such systemsgenerally have audio recordings stored with intent data structures orwith the ability to immediately reproduce intent data structures.

An ideal data source will include voice recordings that previouslyyielded incorrect intents and for which a specialist labeled therecordings with the correct intent. A way to facilitate efficientchecking is to create a web-based interface for a human tosimultaneously listen to speech audio, see the response of the virtualassistant, and type or click an indication of whether it is correct ornot. A second stage web page looks at just the data checked as incorrectand provides the audio and a view of several possible correct intents toselect and an option to indicate if none are correct or enter in thecorrect intent if possible.

From a database of checked and labeled clean data, a training processcan filter the database by intent to provide training data independentlyfor each intent recognizer.

In comparison to procured clean data, harvested data tends to have morediversity of phrasings. As a result, it can be more valuable foraccurate model training, though it can be relatively more expensivebecause it requires the time of specialists to check and label. Also, ithas the cold start problem of the data being available only after asystem has been in the field and users have used it.

TTS Generation of Training Data

Another way to produce or augment training data sets, especially toovercome the cold start problem, is to use parametric TTS to generatespeech audio for identifiable phrasings using high parameter diversity.This is minimally expensive but must be used for only a portion of thetraining data set otherwise the training will overfit to attributes ofthe TTS synthesizer. First generation TTS systems were concatenative.They synthesized speech from recordings of voice donors. Modern TTS usessets of parameters to define the sound of the voice for generatedspeech. The parameters are used by a model, such as a generative neuralnetwork, to produce speech from text. Parametric TTS systems arebecoming more sophisticated, with an ability for greater variation andrealism of synthesized speech. This enables TTS to generate moretraining data, cheaply, without causing the trained model to overfit toattributes of the TTS.

Some domains require variable recognizers that support millions ofvariable values. This occurs, for example, in an application with anintent for viewing items available at Mall-Mart big box retailsuperstores that supports phrasings such as “show me <ITEM>” where<ITEM> is a variable that can refer to any one of millions of items inthe store inventory. When it is impractical to collect voice recordingsreading every one of the item names, it is possible to train a variablerecognizer using a data set of speech audio generated by TTS.

FIG. 10 shows a diagram of a neural TTS generator 1001. It accepts textof variable values as input. Systems may accept words, letters, orphonemes as input. Systems may accept different numbers of inputs. TheTTS generator 1001 uses a neural network with a set of weights toconvert the input text to output speech audio. Some hidden nodes of theneural TTS generator are recurrent.

In designing a natural-sounding TTS generator, a primary goal is tolearn parameter sets that human listeners assess as sounding natural andpleasant. That is not a primary goal for generating data to train avariable recognizer. It is important to find numerous diverse parametersets that, taken together, generate speech audio that matches the rangeof speakers that will use the system.

One approach to accomplishing that is to create a corpus of a diverserange of voices. They may all be saying a specific phrase, such as awake-phrase for a virtual assistant. The voices may all be sayingdifferent phrases. Then:

-   -   1. using a voice analysis (e.g. i-vector fingerprinting)        algorithm according to relevant features, compute a centroid        value for all voice recordings and a range from the centroid        that captures all natural voices. It is important that the        algorithm not only make sure that the human voice        characteristics are present (formant patterns or realistic        voiced speech frequency) but also that non-human voice        characteristics are not present (e.g. noise or other artifacts        that do not occur in human speech).    -   2. using a basic parametric neural generative TTS engine,        generate speech audio for the phrase according to a parameter        set    -   3. analyze the generated speech audio to find its distance from        the centroid    -   4. if the generated audio is beyond the natural range, discard        the parameters set    -   5. else, compute a vector from the centroid to the feature        values of the generated speech audio and save the parameter set        and its vector value    -   6. apply a cost function to choosing a next parameter set that        favors a great distance from the vectors of saved parameter sets        but being within the natural range from the centroid    -   7. go back to step 1 for many iterations    -   8. repeat the procedure above for at least a few different        specific phrases that cover a broad range of phonemes and        diphones.    -   9. for each variable value that the variable recognizer needs to        recognize, for each saved parameter set, generate speech audio        as an initial training set for training the variable recognizer.

One approach to training neural speech-to-meaning from TTS is to:

-   -   1. determine a multiplicity of words that may be values of a        variable in a phrasing of an intent;    -   2. determine a multiplicity of parameter sets representative of        the diversity of voices of users of a virtual assistant;    -   3. synthesize a multiplicity of speech audio segments for the        multiplicity of words, the segments being synthesized according        to the multiplicity of parameter sets; and    -   4. train, using the synthesized speech audio segments, a        variable recognizer that is able to compute a probability of the        presence of any of the multiplicity of words in speech audio.

It is further possible to train an intent recognizer on segments ofspeech audio of a phrasing, wherein an input to the intent recognizer isa probability output from the variable recognizer. Optionally, forsynthesizing speech, it is possible to do so with respect to adjacentphonetic information in the context of the variable within the phrasing.That is, what words/phonemes come before and after the word. Thepronunciation of phonemes is affected by what other phonemes are spokenjust before or just after. This happens inadvertently in all languagesbut specifically by linguistic rules in some languages. The liaisonrules of French are one example.

It is also optionally possible to do so with respect to emphasis on thevariable within the phrasing. Spoken phrases in natural speech,especially commands, often contain emphasis. The emphasis can be onvariable words, to help a listener capture the most relevantinformation. For example, “how is the weather in AUSTIN” so as not to beconfused with “how is the weather in Boston”. Emphasis can also be onother words with critical semantic information. For example, “book aflight FROM London TO Hong Kong”.

One approach to determining a plurality of parameter sets that representthe diversity of users' voices with minimal bias is the following.

-   -   1. procure a multiplicity of speech audio recordings of natural        people representative of the diversity of voices;    -   2. analyze the recordings to compute recorded speech vectors        within an embedding space of voice features;    -   3. compute a region representing a range of recorded speech        vectors within the embedding space; and    -   4. learn the plurality of speech synthesis parameter sets by        gradient descent according to a loss function computed by:        -   4a. synthesizing speech segments according to parameter sets            in the plurality of pa2ameter sets;        -   4b. analyzing the synthesized speech segments to compute            synthesized speech vectors in the space; and        -   4c. computing a loss in proportion to the clustering of the            synthesized speech vectors within the space.

Loss in proportion to clustering means favoring learning a multiplicityof parameter sets that generate an approximately even distribution ofvoice sounds. This avoids bias towards certain speaker types andminimizes the amount of data needed to train an accurate model.

With the well-trained set of speech synthesis parameter sets, it ispossible to synthesize segments of speech of one or more enumeratedwords according to the speech synthesis parameter sets; and use that totrain a variable recognizer, wherein the training data includes thesynthesized segments of speech of the enumerated word. Training data mayalso include other data samples.

Embedding spaces are generally learned. However, they can also be chosenaccording to parameters that engineers or scientists know to berelevant.

In generating parameter sets, synthesizing audio, and analyzing it tocompute its embedding vector, it is possible for some parameter sets togenerate speech that falls outside the range of natural voices. In suchcases, it would be reasonable to simply discard such parameter sets.

To avoid learning parameter sets too tightly constrained to the data setof natural voices used to learn the range of allowable voices, it isreasonable to add some margin around the region. Parameter sets thatsynthesize audio segments that fall within the region, including itsmargin, should not be discarded. They should be used to train arecognizer model that captures unusual voices.

Hybrids of the above approaches to generating training date by TTS arepossible, as are approaches that are generally similar toapplication-specific variations.

Platform Infrastructure

Some companies provide platforms that provide virtual assistantcapability for a diverse range of devices. They also provide access to adiverse range of data source domains and action capability domains. Themore domains a platform supports, the more useful it is to devices usersand the more device users connect to the platform, the more valuable itis for third-party domain providers to provide content through theplatform. A competitive virtual assistant platform provider needs tocontinuously grow to support ever more domain intents that can accessever more types of data through ever more types of devices.

Such platforms will typically provide certain built-in variablerecognizers for variables likely to be used in many domain intents suchas numbers and location names. Platforms will also host many more intentrecognizers than variable recognizers as there is typically one or manyintent recognizers for each domain and can be thousands of third-partydomain providers providing their data and action capability servicesthrough the platform. It is also possible to have domain-specificvariable recognizers, such as one to recognize the names of productsavailable at a specific retailer.

FIG. 11 shows an example of a very small platform used by one or moreuser 1101. The one or more user accesses the domain by voice commandsthrough devices such as a mobile phone 1102, home device 1103, or car1104. The devices are able to access a platform 1105 through a network1106 such as the Internet or a 5G mobile device network. The platform1105 may be provided by a separate company from the device makers andnetwork provider.

The devices send recordings or streams of digital audio containingspeech to the platform. The platform provider offers built-in commonvariable recognizers such as ones for location names 1107, restaurantnames 1108, addresses, 1109, numbers, 1110.

Some platforms may build user-specific variable recognizers such as arecognizer for friend names 1111 that uses data within a user's contactlist and trains from recordings of the user voice and known audiosegments of names with the same lexical spelling.

Some platforms may offer domain-specific variable recognizers eitherprovided by domain providers or trained by the platform provider usingvoice data for recognizable variable values from the domain provider.FIG. 11 does not show a domain-specific variable recognizer.

The platform 1105 also contains a domain recognizer 1112. It is trainedon known or labeled domain-specific speech recordings. It predicts, forincoming speech audio, which domain intent is correct for recognizingthe query. Platforms may use this to condition the running or assertionacceptance of intent recognizers or to rescore intent recognizerhypotheses. This improves accuracy of the platform and therefore theuser experience, especially when the platform provides responses topoorly trained intent recognizers for some third-party domains.

Domain providers provide the per-domain intent recognizers. The domainprovider, perhaps in conjunction with the platform provider, trains therecognizer models for the intents for which their domains can respond.In the system of FIG. 11 , a weather information domain provider withweather data 1113 enables hits to its API when an intent recognizer 1114asserts a hit. The weather provider API hit receives a location namevalue from the location name variable recognizer 1107. A CURL request tothe API only occurs if the location name recognizer asserts a validlocation name during the period of time that audio is received thattriggers the weather intent recognizer. Similarly, a food informationprovider with food data 1115 receives API hits triggered by a foodintent recognizer 1116 that is conditioned on valid restaurant namesfrom the restaurant names variable recognizer. 1108.

A provider of smart lightbulbs 1117 enables them to be controlled by thespeech-to-meaning platform when a lights intent recognizer 1118 triggersan API hit. The light intent API and its recognizer require no inputfrom variable recognizers since the functions of a lightbulb require noinformation other than an ability to turn on and off and shine brighteror dimmer.

A navigation command provider 1119 sends navigation control andinformation to user devices such as a mobile phone 1102 or car 1104 butnot a home device 1103. The navigation domain API access is controlledby a navigation intent recognizer 1120 that requires exactly one of arestaurant name, address, or friend name variable.

A domain with an ability to send messages 1121 is controlled by API hitstriggered by a message intent recognizer 1122. It requires a validfriend name variable as a destination for the message. It also requiresmessage text, which can optionally include numbers. It can also includeany arbitrary text recognized as a transcription using a generalautomatic speech recognition function. That is not shown in FIG. 11 .

Developers of client devices such as mobile phones, home devices, andcars, can choose, through the platform, which domains they can accessand, as a result, which intent recognizers should run for queries fromtheir devices. This is useful because, for example, a home device cannotperform navigation and therefore need not recognizer navigation intents.

Complementing a Grammar-Based System

It is possible to bootstrap a neural-based approach using existing datafrom a grammar-based system by analyzing a large database of queries,grammar parsing each to find its general intent, and producing a list ofintents ordered by frequency. Next, replace variable values with tags(e.g. CITY and NUMBER)

-   -   Example: “what's the weather in <CITY>”    -   Example: “what's <NUMBER> plus <NUMBER>

Then, for the most frequent general intents, find the various phrasingsthat users used to produce the intents, and use the query audio for thatintent as training data for the intent recognizer.

For variable recognizers, search trusted transcriptions for instancesmatching variable values to be learned. Use trimmed, aligned audiosegments for learning each variable value.

Queries that have trusted grammar interpretations are useful as trainingdata. Queries known to be ungrammatical are also useful as negativetraining examples. As a neural speech-to-meaning recognizer is retrainedon ever more data, it becomes able to accurately calculate intenthypotheses for phrasings that do not appear in the grammar. This can beused to provide feedback to grammar writers to assist in improving theirgrammars. This is especially useful for adding new understandingcapability to a system quickly. A grammar developer does their best toanticipate phrasings, and after some time of use in the wild, the systemgives the grammar developer feedback to improve the grammars.

A hybrid system with multiple weighted grammars corresponding todifferent intents can compute intent hypothesis scores from the variousgrammars, according to weights, to guess the most probable intent.Simultaneously, the system can compute intent hypothesis scores using aneural model. The final intent decision can be based on a weightedaverage between the grammar-based and neural-based scores.

It is also possible to use grammars to generate sentences that match thegrammar. Applying TTS to such sentences can produce training audiosegments as described above. A diverse range of TTS parameters andgenerated sentence phrasings can create a very accurate neuralspeech-to-meaning intent recognizer.

Conversation State

When a hit is triggered, a neural speech-to-meaning system may store arecord of a variable type and its value used in an API hit or otherresulting action. There may be multiple stored variable types and valuessuch as a place name, a time, a person name, a male person name, and afemale person name. The collection of past mentioned variables andvalues is known as conversation state.

Intent recognizers may be trained on speech that includes pronouns orother linguistic indicators of references to past semantic information.For example, in English, the word “there” refers to a past mentionedplace such as, “Let's go there” following a previous sentence “Where isthe nearest ice cream shop”. The word “then” can refer to a pastmentioned time. The words “him”, “her”, “he”, and “she” refer to pastmentioned people.

Old conversation state information may be discarded after an amount oftime after which a person would likely forget it in a conversation.Alternatively, conversation state information may be discarded after acertain number of conversation turns. Furthermore, whenever a new valueof a variable type is recognized, the previously stored value for thattype of variable must be discarded because pronouns in humanconversations only refer to the most recent value of any variable type.

Systems may also replace conversation state information not just withnew variable values recognized in user speech, but also with values usedto provide responses to users from information in API responses. Forexample, if a virtual assistant provides a user response saying, “Thenearest ice cream shop is just 3 blocks up the street.”, the system willstore a PLACE variable value of “3 blocks up the street”.

Some systems store a single conversation state history for each userconversation. Accordingly, a geography query, “What is the population ofNew York?”, followed by a weather query, “What's the weather there?”will use the value “New York” for the location slot of the weatherquery.

Some systems store a conversation state history for each domain.Accordingly, a query history such as, “Where's the nearest bagel shop?”,“How many bagel shops are there in Pocatello?”, “Give me directionsthere.” will give directions to the nearest bagel shop, not directionsto Pocatello.

One approach to recognizing when to use information stored inconversation state rather than a variable value is to train a model onconversational audio labeled with pronouns and pointers to theirreferents. The specific referents are not of interest, but training toidentify pronouns and pointers to arguments in the specific intents ofprevious queries is important to learn features that indicate such alook-up requirement. Training can include both previous specific intentsand responses that went from the machine to the user since pronouns canrefer to semantic information in the response, not just from priorqueries.

A neural Turing machine approach, such as the one by Graves(arXiv:1410.5401v2 [cs.NE] 10 Dec. 2014), is also possible. A neuralTuring machine can store and retrieve information (probabilistically) ina memory as indicated by an attention mechanism.

Linguistic Complexities

The following considerations are not essential for a system to achievehigh user satisfaction. A large majority (99% or more) of queries tovirtual assistants are linguistically simple and would not benefit fromthe considerations below. However, supporting linguistically complexqueries is a selling point for some virtual assistants. The followingare some challenging cases and how to handle them.

NEGATIVES—One approach is to train a variable recognizer for negationwords (e.g. “not”, “except”, “without”). Based on the time of the wordcorrespondingly just before (for some languages such as English) orafter (for some other languages) the negation word relative to the verbfeature of a query, the output intent gets a negation indicator in theintent. The negative indicator may be passed along with an API requestif supported by the API protocol. It also may be used to condition orfilter a response from an API hit.

Another approach is to train with data samples that have negation. It ispossible to synthesize examples with negation from human recorded speechdata or TTS-generated data.

DOUBLE NEGATIVES AND MID-SENTENCE CORRECTIONS—This is not a majorconcern because they are rare, and users will understand why a responseis nonsensical.

COMPOUND QUERIES—It is possible to train a query boundary recognizerfrom labeled audio or from synthesized single queries. For the Englishlanguage, the word “and” will tend to emerge as a highly weightedfeature for discerning compound queries.

CRMs

FIG. 12A shows an example non-transitory computer readable medium thatis a rotating magnetic disk. Data centers commonly use magnetic disks tostore data and code comprising instructions for server processors. Themagnetic disk stores code comprising instructions that, if executed byone or more computers, would cause the computer to perform steps ofmethods described herein. Rotating optical disks and other mechanicallymoving storage media are possible.

FIG. 12B shows an example non-transitory computer readable medium thatis a Flash random access memory (RAM) chip. Data centers commonly useFlash memory to store data and code for server processors. Mobiledevices commonly use Flash memory to store data and code for processorswithin system-on-chip devices. The Flash RAM chip stores code comprisinginstructions that, if executed by one or more computers, would cause thecomputer to perform steps of methods described herein. Other non-movingstorage media packaged with leads or solder balls are possible.

Various types of computer-readable media are appropriate for storingcode comprising instructions according to various embodiments.

The SoC

FIG. 13A shows the bottom side of a packaged system-on-chip device 1300with a ball grid array for surface-mount soldering to a printed circuitboard. Various package shapes and sizes are possible for various chipimplementations. System-on-chip (SoC) devices control many embeddedsystems embodiments as described herein.

FIG. 13B shows a block diagram of the system-on-chip 1300. It comprisesa multicore cluster of computer processor (CPU) cores 1301 and amulticore cluster of graphics processor (GPU) cores 1302. The processorsconnect through a network-on-chip 1303 to an off-chip dynamic randomaccess memory (DRAM) interface 1304 for volatile program and datastorage and a Flash interface 1305 for non-volatile storage of computerprogram code in a Flash RAM non-transitory computer readable medium. SoC1300 also has a display interface 1306 for displaying a GUI and an I/Ointerface module 1307 for connecting to various I/O interface devices,as needed for different peripheral devices. The I/O interface enablessensors such as touch screen sensors, geolocation receivers,microphones, speakers, Bluetooth peripherals, and USB devices, such askeyboards and mice, among others. SoC 1300 also comprises a networkinterface 1308 to allow the processors to access the Internet throughwired or wireless connections such as WiFi, 3G, 4G long-term evolution(LTE), 5G, and other wireless interface standard radios as well asEthernet connection hardware. By executing instructions stored in RAMdevices through interface 1304 or Flash devices through interface 1305,the CPUs 1301 and GPUs 1302 perform steps of methods as describedherein.

The Server

FIG. 14A shows a rack-mounted server blade multi-processor server system1400 according to some embodiments. It comprises a multiplicity ofnetwork-connected computer processors that run software in parallel.

FIG. 14B shows a block diagram of the server system 1400. It comprises amulticore cluster of computer processor (CPU) cores 1401 and a multicorecluster of graphics processor (GPU) cores 1402. The processors connectthrough a board-level interconnect 1403 to random-access memory (RAM)devices 1404 for program code and data storage. Server system 1400 alsocomprises a network interface 1408 to allow the processors to access theInternet. By executing instructions stored in RAM devices 1404, the CPUs1401 and GPUs 1402 perform steps of methods as described herein.

Special Boilerplate

Examples shown and described use certain spoken languages. Variousembodiments operate, similarly, for other languages or combinations oflanguages. Examples shown and described use certain domains ofknowledge. Various embodiments operate similarly for other domains orcombinations of domains.

Some embodiments are screenless, such as an earpiece, which has nodisplay screen. Some embodiments are stationary, such as a vendingmachine. Some embodiments are mobile, such as an automobile. Someembodiments are portable, such as a mobile phone. Some embodiments arefor implanting in a human body. Some embodiments comprise manualinterfaces such as keyboards or touchscreens. Some embodiments compriseneural interfaces that use human thoughts as a form of natural languageexpression.

Some embodiments function by running software on general-purposeprogrammable processors (CPUs) such as ones with ARM or x86architectures. Some power-sensitive embodiments and some embodimentsthat require especially high performance such as for neural networktraining use hardware optimizations. Some embodiments useapplication-customizable processors with configurable instruction setsin specialized systems-on-chip, such as ARC processors from Synopsys andXtensa processors from Cadence. Some embodiments use dedicated hardwareblocks burned into field programmable gate arrays (FPGAs). Someembodiments use arrays of graphics processing units (GPUs). Someembodiments use application-specific-integrated circuits (ASICs) withcustomized logic to give best performance. Some embodiments are inhardware description language code such as code written in the languageVerilog.

Some embodiments of physical machines described and claimed herein areprogrammable in numerous variables, combinations of which provideessentially an infinite variety of operating behaviors. Some embodimentsherein are configured by software tools that provide numerousparameters, combinations of which provide for essentially an infinitevariety of physical machine embodiments of the invention described andclaimed. Methods of using such software tools to configure hardwaredescription language representations embody the invention described andclaimed. Physical machines can embody machines described and claimedherein, such as: semiconductor chips; hardware description languagerepresentations of the logical or functional behavior of machinesaccording to the invention described and claimed; and one or morenon-transitory computer readable media arranged to store such hardwaredescription language representations.

Hardware blocks, custom processor instructions, co-processors, andhardware accelerators perform neural network processing or parts ofneural network processing algorithms with particularly high performanceand power efficiency. This provides long battery life forbattery-powered devices and reduces heat removal costs in data centersthat serve many client devices simultaneously.

General Boilerplate

Practitioners skilled in the art will recognize many modifications andvariations. The modifications and variations include any relevantcombination of the disclosed features.

Various embodiments are methods that use the behavior of either or acombination of humans and machines. Some embodiments are systems of oneor more non-transitory computer readable media arranged to store suchinstructions for methods described herein. Some embodiments are physicaldevices such as semiconductor chips; hardware description languagerepresentations of the logical or functional behavior of such devices;and one or more non-transitory computer readable media arranged to storesuch hardware description language representations.

Descriptions herein reciting principles, features, and embodimentsencompass both structural and functional equivalents thereof.

What is claimed is:
 1. A method comprising: obtaining audio; directlyinferring, from the audio, a plurality of intent probabilities; and inresponse to an intent probability exceeding an intent threshold,invoking a virtual assistant action, wherein the virtual assistantaction is conditional based on which intent probability is the highest.2. The method of claim 1 wherein the intent probability is especiallyhigh when the audio includes speech of words with the same meaning in aplurality of natural languages.
 3. The method of claim 1 whereininvoking the virtual assistant action is conditional based on having notpreviously invoked an action within a specific amount of time.
 4. Themethod of claim 1 wherein invoking the virtual assistant action isconditional based on end-of-utterance detection on the audio.
 5. Themethod of claim 1 further comprising: directly inferring, from theaudio, a plurality of variable value probabilities, wherein the virtualassistant action comprises an argument indicating which variable valueprobability is the highest.
 6. The method of claim 1 further comprising:directly inferring, from the audio, a variable value probability,wherein the virtual assistant action is conditional based on thevariable value probability exceeding a variable value threshold.
 7. Themethod of claim 6 wherein the virtual assistant action is furtherconditional based on the variable value probability exceeding thevariable value threshold within a specific time period of the intentprobability exceeding the intent threshold.
 8. The method of claim 1further comprising: directly inferring, from the audio, a domainprobability, wherein the virtual assistant action is conditional basedon the domain probability exceeding a domain threshold.
 9. The method ofclaim 1 further comprising: directly inferring, from the audio, a domainprobability, wherein the virtual assistant action is conditional basedon the domain probability exceeding a domain threshold; directlyinferring, from the audio, a plurality of variable value probabilities;and the virtual assistant action comprising an argument indicating whichvariable value probability is the highest.
 10. A method comprising:obtaining audio; directly inferring, from the audio: (a) a domainprobability; (b) a plurality of intent probabilities; and (c) aplurality of variable value probabilities; and in response to: (A) thedomain probability exceeding a domain threshold; (B) an intentprobability exceeding an intent threshold when the audio includes speechof words in one of a plurality of recognized natural languages; (C) avariable value probability exceeding a variable value threshold within acertain period of time of the intent probability exceeding the intentthreshold; (D) an end of an utterance detection signal; and (E) aspecific amount of time having elapsed, invoking a virtual assistantaction comprising an argument indicating which variable valueprobability is the highest.
 11. A device configured to perform themethod of claim 1.